package com.sz.app.oss.api.common.base.dto;

import com.sz.common.base.dto.I18nDto;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * Function: 费用类型Dto <br>
 * Author: hpeng.wang <br>
 * Date: 2016-12-08 14:27:00
 */
public class FeeTypeDto {
    /**
     * 费用类型id
     */
    private Integer id;

    /**
     * 费用类型编码
     */
    @NotBlank(message = "validate.notnull")
    private String code;

    /**
     * 费用类型名字
     */
    private String name;

    /**
     * 费用的类型 1、空运费  2 海运费  3、燃油附加费
     */
    @NotNull
    private Integer type;

    private String typeName;


    /**
     * 详细描述
     */
    private String description;

    private List<I18nDto> i18n;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<I18nDto> getI18n() {
        return i18n;
    }

    public void setI18n(List<I18nDto> i18n) {
        this.i18n = i18n;
    }

    public void addI18n(I18nDto i18nDto) {
        if (i18n == null) {
            i18n = new ArrayList<>();
        }
        i18n.add(i18nDto);
    }
}